﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ESOL.Business.Mst;

namespace ESOL.WinUI.Hr
{
    public partial class frmMaintainBirthdayAlert : BaseForm.frmBaseDialogyQueryForm
    {
        public frmMaintainBirthdayAlert()
        {
            InitializeComponent();
        }

        private void BindComboBox()
        {
            UICommon.UICommonFunctions.BindGridComboboxByCommonItem(colGender, "GENDER", true);
        }

        private string GetCondition()
        {
            string condition = "  AND P.BIRTHDAY LIKE '%" + DateTime.Today.ToString("MM-dd") + "%'";
            return condition;
        }

        private void BindDataGrid()
        {
            string condition = GetCondition();
            string orderBy = "PERSON_CODE";
            DataTable dt = MstPersonBs.GetPersonByCondition(condition, orderBy, "");
            gvMain.DataSource = dt;
        }

        protected override void  OnShown(EventArgs e)
        {
            BindComboBox();
            BindDataGrid();
            base.OnShown(e);
        }

    }
}
